package inicio;

import java.sql.*;

public class ConnectionManager {
	private String CLASS_DRIVER_NAME;
	private Connection conn;

	public Connection getConn() {
		return conn;
	}

	public ConnectionManager() {
		try {
			CLASS_DRIVER_NAME = "jdbc:odbc:DRIVER=Microsoft Access Driver (*.mdb);DBQ=Tateti.mdb;";
			Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
			conn = DriverManager.getConnection(CLASS_DRIVER_NAME);
		} catch (ClassNotFoundException e) {
			e.printStackTrace();
		} catch (SQLException e) {
			e.printStackTrace();
		}
	}

	public void Desconectar() {
		try {
			if (conn != null)
				conn.close();
		} catch (SQLException e) {
			e.printStackTrace();
		}
	}

}
